import Vue from 'vue'
import VueRouter from 'vue-router'
// import HomeView from '../views/HomeView.vue'
let Index=()=> import('../views/Index.vue')
let List=()=> import('../views/List.vue')
let Videodetail=()=> import('../views/Videodetail.vue')
let Search=()=> import('../views/Search.vue')
let Login=()=> import('../views/Login.vue')
let Register=()=> import('../views/Register.vue')
let Userset=()=> import('../views/Userset.vue')

Vue.use(VueRouter)

const routes = [
  {
    path: '/index',
    name: 'index',
    component:Index
  },
  {
    path: '/list',
    name: 'list',
    component:List
  },
  {
    path: '/videodetail',
    name: 'videodetail',
    component:Videodetail
  },
  {
    path: '/search',
    name: 'search',
    component:Search
  },
  {
    path: '/login',
    name: 'login',
    component:Login
  },
  {
    path: '/register',
    name: 'register',
    component:Register
  },
  {
    path: '/userset',
    name: 'userset',
    component:Userset
  },
  {
    path: '*',
    redirect: '/index',
  },
]

const router = new VueRouter({
  routes
})

export default router
